import static org.junit.Assert.*;


import org.junit.Test;



public class MathExam6724Test {

	@Test
	public void testQuizExist() {
		MathExam6724 mathExam6724=new MathExam6724();
		assertEquals(false, mathExam6724.quizExist(0, 0));
	}
	
	@Test
	public void testCheckParameters() {
		MathExam6724 mathExam6724=new MathExam6724();
		String[] argStrings=new String[2];
		assertEquals(false, mathExam6724.checkParameters(argStrings));
		argStrings[0]="1";
		argStrings[1]=null;
		assertEquals(false, mathExam6724.checkParameters(argStrings));
		argStrings[0]=null;
		argStrings[1]="1";
		assertEquals(false, mathExam6724.checkParameters(argStrings));
		argStrings[0]="1";
		argStrings[1]="1";
		assertEquals(true, mathExam6724.checkParameters(argStrings));
		argStrings[0]="21";
		argStrings[1]="1";
		assertEquals(false, mathExam6724.checkParameters(argStrings));
		argStrings[0]="20";
		argStrings[1]="2";
		assertEquals(true, mathExam6724.checkParameters(argStrings));
		argStrings[0]="-1";
		argStrings[1]="2";
		assertEquals(false, mathExam6724.checkParameters(argStrings));
		argStrings[0]="0";
		argStrings[1]="0";
		assertEquals(false, mathExam6724.checkParameters(argStrings));
	}

	@Test
	public void testGenerate() {
		MathExam6724 mathExam6724=new MathExam6724();
		mathExam6724.generate(1, 1);
		assertEquals(1, mathExam6724.getQuiz().length);
		mathExam6724.generate(20, 1);
		assertEquals(20, mathExam6724.getQuiz().length);
		mathExam6724.generate(1, 2);
		assertEquals(1, mathExam6724.getQuiz().length);
		mathExam6724.generate(20, 2);
		assertEquals(20, mathExam6724.getQuiz().length);
	}

}
